#include "ActivityItemType.h"

ActivityItemType::ActivityItemType(QObject *parent)
{
}

ActivityItemType::ActivityItemType(const ActivityItemType &other)
{
    m_activityParentSid  =  other.activityParentSid();
    m_activityParentName  =  other.activityParentName();
    m_activityGroupSid  =  other.activityGroupSid();
    m_activitiesSid  =  other.activitiesSid();
    m_serialNumberInLayer  =  other.serialNumberInLayer();
    m_title  =  other.title();
    m_note  =  other.note();
    m_type  =  other.type();
    m_status  =  other.status();
    m_isAutoCompleted  =  other.isAutoCompleted();
    m_isLastActivityEndAllProjecCompleted  =  other.isLastActivityEndAllProjecCompleted();
    m_timeType  =  other.timeType();
    m_addTime  =  other.addTime();
    m_editTiem  =  other.editTiem();
    m_estimatedTime  =  other.estimatedTime();
    m_DeferUntilTime  =  other.DeferUntilTime();
    m_completedTime  =  other.completedTime();
    m_nextTime  =  other.nextTime();
    m_nextTestTime  =  other.nextTestTime();
    m_passTime  =  other.passTime();
    m_passTimeType  =  other.passTimeType();
    m_catalogueSid  =  other.catalogueSid();
    m_catalogueName  =  other.catalogueName();
    m_flagName  =  other.flagName();
    m_contextSid  =  other.contextSid();
    m_contextName  =  other.contextName();
}

ActivityItemType::~ActivityItemType()
{

}

QString ActivityItemType::activityParentSid() const
{
    return m_activityParentSid;
}

QString ActivityItemType::activityParentName() const
{
    return m_activityParentName;
}

QString ActivityItemType::activityGroupSid() const
{
    return m_activityGroupSid;
}


QString ActivityItemType::activitiesSid() const
{
    return m_activitiesSid;
}

int ActivityItemType::serialNumberInLayer() const
{
    return m_serialNumberInLayer;
}

QString ActivityItemType::title() const
{
    return m_title;
}

QString ActivityItemType::note() const
{
    return m_note;
}

QString ActivityItemType::type() const
{
    return m_type;
}

QString ActivityItemType::status() const
{
    return m_status;
}

int ActivityItemType::isAutoCompleted() const
{
    return m_isAutoCompleted;
}

int ActivityItemType::isLastActivityEndAllProjecCompleted() const
{
    return m_isLastActivityEndAllProjecCompleted;
}

int ActivityItemType::timeType() const
{
    return m_timeType;
}

QDateTime ActivityItemType::addTime() const
{
    return m_addTime;
}

QDateTime ActivityItemType::editTiem() const
{
    return m_editTiem;
}

QDateTime ActivityItemType::estimatedTime() const
{
    return m_estimatedTime;
}

QDateTime ActivityItemType::DeferUntilTime() const
{
    return m_DeferUntilTime;
}

QDateTime ActivityItemType::completedTime() const
{
    return m_completedTime;
}

QDateTime ActivityItemType::nextTime() const
{
    return m_nextTime;
}

QDateTime ActivityItemType::nextTestTime() const
{
    return m_nextTestTime;
}

double ActivityItemType::passTime() const
{
    return m_passTime;
}

QString ActivityItemType::passTimeType() const
{
    return m_passTimeType;
}

int ActivityItemType::catalogueSid() const
{
    return m_catalogueSid;
}

QString ActivityItemType::catalogueName() const
{
    return m_catalogueName;
}

QString ActivityItemType::flagName() const
{
    return m_flagName;
}

int ActivityItemType::contextSid() const
{
    return m_contextSid;
}

QString ActivityItemType::contextName() const
{
    return m_contextName;
}

void ActivityItemType::setActivityParentSid(QString activityParentSid)
{
    if (m_activityParentSid == activityParentSid)
        return;

    m_activityParentSid = activityParentSid;
    emit activityParentSidChanged(m_activityParentSid);
}

void ActivityItemType::setActivityParentName(QString activityParentName)
{
    if (m_activityParentName == activityParentName)
        return;

    m_activityParentName = activityParentName;
    emit activityParentNameChanged(m_activityParentName);
}

void ActivityItemType::setActivityGroupSid(QString activityGroupSid)
{
    if (m_activityGroupSid == activityGroupSid)
        return;

    m_activityGroupSid = activityGroupSid;
    emit activityGroupSidChanged(m_activityGroupSid);
}

void ActivityItemType::setActivitiesSid(QString activitiesSid)
{
    if (m_activitiesSid == activitiesSid)
        return;

    m_activitiesSid = activitiesSid;
    emit activitiesSidChanged(m_activitiesSid);
}

void ActivityItemType::setSerialNumberInLayer(int serialNumberInLayer)
{
    if (m_serialNumberInLayer == serialNumberInLayer)
        return;

    m_serialNumberInLayer = serialNumberInLayer;
    emit serialNumberInLayerChanged(m_serialNumberInLayer);
}

void ActivityItemType::setTitle(QString title)
{
    if (m_title == title)
        return;

    m_title = title;
    emit titleChanged(m_title);
}

void ActivityItemType::setNote(QString note)
{
    if (m_note == note)
        return;

    m_note = note;
    emit noteChanged(m_note);
}

void ActivityItemType::setType(QString type)
{
    if (m_type == type)
        return;

    m_type = type;
    emit typeChanged(m_type);
}

void ActivityItemType::setStatus(QString status)
{
    if (m_status == status)
        return;

    m_status = status;
    emit statusChanged(m_status);
}

void ActivityItemType::setIsAutoCompleted(int isAutoCompleted)
{
    if (m_isAutoCompleted == isAutoCompleted)
        return;

    m_isAutoCompleted = isAutoCompleted;
    emit isAutoCompletedChanged(m_isAutoCompleted);
}

void ActivityItemType::setIsLastActivityEndAllProjecCompleted(int isLastActivityEndAllProjecCompleted)
{
    if (m_isLastActivityEndAllProjecCompleted == isLastActivityEndAllProjecCompleted)
        return;

    m_isLastActivityEndAllProjecCompleted = isLastActivityEndAllProjecCompleted;
    emit isLastActivityEndAllProjecCompletedChanged(m_isLastActivityEndAllProjecCompleted);
}

void ActivityItemType::setTimeType(int timeType)
{
    if (m_timeType == timeType)
        return;

    m_timeType = timeType;
    emit timeTypeChanged(m_timeType);
}

void ActivityItemType::setAddTime(QDateTime addTime)
{
    if (m_addTime == addTime)
        return;

    m_addTime = addTime;
    emit addTimeChanged(m_addTime);
}

void ActivityItemType::setEditTiem(QDateTime editTiem)
{
    if (m_editTiem == editTiem)
        return;

    m_editTiem = editTiem;
    emit editTiemChanged(m_editTiem);
}

void ActivityItemType::setEstimatedTime(QDateTime estimatedTime)
{
    if (m_estimatedTime == estimatedTime)
        return;

    m_estimatedTime = estimatedTime;
    emit estimatedTimeChanged(m_estimatedTime);
}

void ActivityItemType::setDeferUntilTime(QDateTime DeferUntilTime)
{
    if (m_DeferUntilTime == DeferUntilTime)
        return;

    m_DeferUntilTime = DeferUntilTime;
    emit DeferUntilTimeChanged(m_DeferUntilTime);
}

void ActivityItemType::setCompletedTime(QDateTime completedTime)
{
    if (m_completedTime == completedTime)
        return;

    m_completedTime = completedTime;
    emit completedTimeChanged(m_completedTime);
}

void ActivityItemType::setNextTime(QDateTime nextTime)
{
    if (m_nextTime == nextTime)
        return;

    m_nextTime = nextTime;
    emit nextTimeChanged(m_nextTime);
}

void ActivityItemType::setNextTestTime(QDateTime nextTestTime)
{
    if (m_nextTestTime == nextTestTime)
        return;

    m_nextTestTime = nextTestTime;
    emit nextTestTimeChanged(m_nextTestTime);
}

void ActivityItemType::setpassTime(double passTime)
{
    qWarning("Floating point comparison needs context sanity check");
    if (qFuzzyCompare(m_passTime, passTime))
        return;

    m_passTime = passTime;
    emit passTimeChanged(m_passTime);
}

void ActivityItemType::setPassTimeType(QString passTimeType)
{
    if (m_passTimeType == passTimeType)
        return;

    m_passTimeType = passTimeType;
    emit passTimeTypeChanged(m_passTimeType);
}

void ActivityItemType::setCatalogueSid(int catalogueSid)
{
    if (m_catalogueSid == catalogueSid)
        return;

    m_catalogueSid = catalogueSid;
    emit catalogueSidChanged(m_catalogueSid);
}

void ActivityItemType::setCatalogueName(QString catalogueName)
{
    if (m_catalogueName == catalogueName)
        return;

    m_catalogueName = catalogueName;
    emit catalogueNameChanged(m_catalogueName);
}

void ActivityItemType::setFlagName(QString flagName)
{
    if (m_flagName == flagName)
        return;

    m_flagName = flagName;
    emit flagNameChanged(m_flagName);
}

void ActivityItemType::setContextSid(int contextSid)
{
    if (m_contextSid == contextSid)
        return;

    m_contextSid = contextSid;
    emit contextSidChanged(m_contextSid);
}

void ActivityItemType::setContextName(QString contextName)
{
    if (m_contextName == contextName)
        return;

    m_contextName = contextName;
    emit contextNameChanged(m_contextName);
}
